import request from '@/utils/request'
import qs from 'qs'
import { getToken } from '@/utils/auth'
export function VEPagesApi(data) {
  return request({
    url: '/user/page',
    method: 'get',
    params: data,
    paramsSerializer: params => {
      return qs.stringify(params, { indices: false })
    }
  })
}

export function addPersonApi(data) {
  return request({
    url: '/user',
    method: 'post',
    data
  })
}

export function editPersonApi(data) {
  return request({
    url: '/user',
    method: 'put',
    data
  })
}

export function skillApi() {
  return request({
    url: '/skill',
    method: 'get',
  })
}

export function downLoadImgApi(data) {
  return request({
    method: 'get',
    url: '/common/download',
    params: data,
    paramsSerializer: params => {
      return qs.stringify(params, { indices: false })
    },
    responseType: "blob",
  })
}


export function uploadAvaApi() {
  return request({
    method: 'post',
    url: '/common/upload',
    headers: 'Bearer' + getToken()
  })
}
